import { getSearchlistRequest } from '@/api'
const state = {
  searchList: {}
}
const mutations = {
  SET_SEARCHLIST_STATE(state, value) {
    state.searchList = value
  }
}
const actions = {
  async getSearchList({commit},params) {
    const re = await getSearchlistRequest(params)
    // console.log(re, 're');
    commit('SET_SEARCHLIST_STATE',re)

  }
}
const getters = {
  attrsList(state){
    return state.searchList.attrsList
  },
  goodsList(){
    return state.searchList.goodsList
  },
  trademarkList(){
    return state.searchList.trademarkList
  }

}

export default {
  namespaced:true,
  state,
  actions,
  mutations,
  getters
}